<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    @是v-on:的简写     :是v-bind:的简写
    <h1 v-if="type==='A'">A</h1>
    <h1 v-else>C</h1>
</div>

<script src="http://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.min.js"></script>
<script>
    var vm=new Vue({
        el: "#app",
        data: {
            type: 'A'
        }
    });
</script>
</body>
</html>